<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>充值页面</title>

    <link rel="stylesheet" type="text/css" href="../public/home/css/amazeui.min.css" />
    <link rel="stylesheet" type="text/css" href="../public/home/css/main.css" />
    <link rel="stylesheet" type="text/css" href="../public/home/css/style_1_common.css" />
    <link rel="stylesheet" type="text/css" href="../public/home/css/style_1_forum_index.css" />
    <link rel="stylesheet" id="css_extstyle" type="text/css" href="../public/home/css/style.css" />
    <script src="../public/home/js/common.js" type="text/javascript"></script>
    <script src="../public/home/js/forum.js" type="text/javascript"></script>
    <script src="../public/home/js/lunbo.js" type="text/javascript"></script>
    <script type="text/javascript" src="../public/admin/js/xadmin.js"></script>
    <script src="../public/home/js/jquery.min.js"></script>
</head>
<body>
<div id="append_parent"></div><div id="ajaxwaitid"></div>
<div id="toptb" class="cl">
    <div class="wp">
        <div class="z"><a href="javascript:;"  onclick="setHomepage('#');">设为首页</a><a href="#"  onclick="addFavorite(this.href, '思爱婚介');return false;">收藏本站</a></div>
        <div class="y">
            <a id="switchblind" href="javascript:;" onClick="toggleBlind(this)" title="开启辅助访问" class="switchblind">开启辅助访问</a>
        </div>
    </div>
</div>

<div id="qmenu_menu" class="p_pop blk" style="display: none;">
    <div class="ptm pbw hm">
        请 <a href="javascript:;" class="xi2" onclick="lsSubmit()"><strong>登录</strong></a> 后使用快捷导航<br />没有帐号？<a href="./register/register.php" class="xi2 xw1">立即注册</a>
    </div>
    <div id="fjump_menu" class="btda"></div></div><div id="hd">
    <div class="wp">
        <div class="hdc cl"><h2><a href="index.php" title="思爱婚介"><img src="../public/home/images/logo.png" alt="思爱婚介" border="0" /></a>
            </h2><script src="js/logging.js" type="text/javascript"></script>
            <?php
            require 'config.php';
            @$id = $_COOKIE['id1'];
            @$sql = "select * from userdetail where uid = $id ";
            @$result = mysqli_query($link,$sql);
            @$rows = mysqli_fetch_assoc($result);
            @$photo = $rows['photo'];
            @$fh='x_';
            @$hz=basename($photo);
            @$logo1 = './images/'.$hz;
            @$logo ='./upuser/images/'.$fh.$hz;
            @$sql1 = "select * from jifen where uid = $id";
            @$result1 = mysqli_query($link,$sql1);
            @$rows1 = mysqli_fetch_assoc($result1);
            @$jien = $rows1['integral'];
            @$group = $rows1['group'];
            if ($jien <= 100){
                $group = '黑铁';
            }elseif ($jien <= 200 && $jien>100){
                $group = '白银';
            }elseif ($group <= 300 && $jien>200){
                $group = '黄金';
            }elseif ($group <= 400 && $jien>300){
                $group = '白金';
            }elseif ($group <= 500 && $jien>400){
                $group = '钻石';
            }elseif ($group>500){
                $group = '王者';
            }
            ?>
            <?php
            @$auth = $_COOKIE['uname1'];
            @$auth1 = $_COOKIE['auth1'];
            if(empty($auth)){
                echo '<form method="post" autocomplete="off" id="lsform" action="contro.php?a=login">
                <div class="fastlg cl">
                    <span id="return_ls" style="display:none"></span>
                    <div class="y pns">
                        <table cellspacing="0" cellpadding="0">
                            <tr>

                                <td>用户名:<input type="text" name="uname" id="ls_username" autocomplete="off" class="px vm" tabindex="901" /></td>
                                <td class="fastlg_l"><label for="ls_cookietime"><input type="checkbox" name="ji" value="1"/>记住密码</label></td>
                                <td>&nbsp;<a href="../mima/mima.php">找回密码</a></td>
                            </tr>
                            <tr>
                                <td>密　码:<input type="password" name="pwd" id="ls_username" autocomplete="off" class="px vm" tabindex="901" /></td>
                                <td class="fastlg_l"><input type="submit" class="pn vm" tabindex="904" value="登录" style="width: 75px;"></input></td>
                                <td>&nbsp;<a href="./register/register.php" class="xi2 xw1">立即注册</a></td>
                            </tr>
                        </table>
                        <input type="hidden" name="quickforward" value="yes" />
                        <input type="hidden" name="handlekey" value="ls" />
                    </div>
                </div>
            </form>';
            }else{
                if ($auth1 =='普通用户'){
                    echo "
                <div id=\"um\" style='float: right;'>
                <p style='float: left'>
                <img style='height: 50px;' src=\"{$logo}\"></p>
                <div style='float: right; margin-left: 10px;'>
                <strong><a href=\"./upuser/update.php\">{$auth}</a></strong>
                <span class=\"pipe\">|</span><a href=\"./upuser/update.php\">完善资料</a>
                <span class=\"pipe\">|</span><a href=\"\">签到</a>
                <span class=\"pipe\">|</span><a href='vip.php'>
                    充值会员
                </a>
                <script language=\"javascript\">delayShow($('myprompt'), function() {showMenu({'ctrlid':'myprompt','duration':3})});</script><span class=\"pipe\">|</span>
        
                <span class=\"pipe\">|</span><a href=\"contro.php?a=exit\">退出</a>
                <p>
<a href=\"\" id=\"extcreditmenu\"  class=\"showmenu\" initialized=\"true\">积分: $jien</a>
<span class=\"pipe\">|</span><a href=\"\" id=\"g_upmine\" class=\"showmenu\">用户组: $group</a>
</p>
                </div>
                
                </div>";
                }else{
                    echo "
                <div id=\"um\" style='float: right;'>
                <p style='float: left'>
                <img style='height: 50px;' src=\"{$logo}\"></p>
                <div style='float: right; margin-left: 10px; '>
                <strong><a href=\"\" target=\"_blank\" style='color:red;'>{$auth}</a></strong>
                <span class=\"pipe\">|</span><a href=\"./upuser/update.php\">完善资料</a>
                <span class=\"pipe\">|</span><a href=\"\">签到</a>
                <span class=\"pipe\">|</span><a href='vip.php'>
                    充值会员
                </a>
                <script language=\"javascript\">delayShow($('myprompt'), function() {showMenu({'ctrlid':'myprompt','duration':3})});</script><span class=\"pipe\">|</span>
              
                <span class=\"pipe\">|</span><a href=\"contro.php?a=exit\">退出</a>
                  <p>
<a href=\"\" id=\"extcreditmenu\"  class=\"showmenu\" initialized=\"true\">积分: $jien</a>
<span class=\"pipe\">|</span><a href=\"\" id=\"g_upmine\" class=\"showmenu\">用户组: $group</a>
</p>
                </div>
                
                </div>";
                }

            }
            ?>


            <script src="js/md5.js" type="text/javascript" reload="1"></script>
        </div>

        <div id="nv">
            <a href="javascript:;" id="qmenu" onMouseOver="delayShow(this, function () {showMenu({'ctrlid':'qmenu','pos':'34!','ctrlclass':'a','duration':2});showForummenu();})">快捷导航</a>
            <ul><li class="a" id="mn_forum" ><a href="./index.php" hidefocus="true" title="BBS"  >论坛首页<span>BBS</span></a>
                <li id="mn_F478" ><a href="#" hidefocus="true"  >两性课堂</a></li>
                <li id="mn_F477" ><a href="#" hidefocus="true"  >网上征婚指南</a></li>
                <li id="mn_F476" ><a href="#" hidefocus="true"  >成功案例</a></li>
                <li id="mn_F482" ><a href="#" hidefocus="true"  >专家咨询</a></li></ul>
        </div>
        <div id="mu" class="cl">
        </div><div id="scbar" class="cl">
            <form id="scbar_form" method="post" action="search.php?a=sea" >
                <input type="hidden" name="id" id="scbar_mod" value="" />
                <table cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="scbar_icon_td"></td>
                        <td class="scbar_txt_td"><input type="text" name="sear" id="scbar_txt" placeholder="请输入搜索内容" /></td>
                        <td style="padding-left: 10px"><select name="select">
                                <option value="1">帖子</option>
                                <option value="3">用户</option>
                                <option value="4">板块</option>
                            </select></td>
                        <td ><input type="submit" name="" id="scbar_btn" class="pn pnc" value="搜索" ></td>
                        <td class="scbar_hot_td">
                        </td>
                    </tr>
                </table>
            </form>
        </div>
<div class="pay">
    <!--主内容开始编辑-->
    <div class="tr_recharge">
        <?php    @$auth = $_COOKIE['uname1'];
        @$auth1 = $_COOKIE['auth1'];
        @$uid = $_COOKIE['id1'];

        ?>
        <div class="tr_rechtext">
            <p class="te_retit"><img src="../public/home/images/coin.png" alt="" />充值中心</p>
            <p style="font-size: 18px; color: red">不充值会员是找不到对象滴！！！！</p>
        </div>
        <?php
               if ($auth1 == '普通用户'){
                   ?>
                  <form action="pchong.php" method="post">
                   <input type="hidden" name="name" value="<?php echo $auth?>">
                   <input type="hidden" name="id" value="<?php echo $uid?>">
                   <input type="hidden" name="auth" value="<?php echo $auth1?>">
                   <div class="tr_rechbox">
                       <div class="tr_rechhead">
                           <img style='height: 50px;' src="<?php echo $logo?>"></p>
                           <p>充值帐号：
                               <a><?php echo $auth?></a>
                           </p>

                       </div>
                       <div class="tr_rechli am-form-group">
                           <ul class="ui-choose am-form-group" id="uc_01">
                               <li>
                                   <label class="am-radio-inline">
                                       <input type="radio"  value="1" name="yue" > 一个月
                                   </label>
                               </li>
                               <li>
                                   <label class="am-radio-inline">
                                       <input type="radio" value="3" name="yue" > 三个月
                                   </label>
                               </li>

                               <li>
                                   <label class="am-radio-inline">
                                       <input type="radio" value="6" name="yue"> 半年
                                   </label>
                               </li>
                               <li>
                                   <label class="am-radio-inline">
                                       <input type="radio" value="12" name="yue" data-validation-message="请选择一项充值额度"> 一年
                                   </label>
                               </li>
                           </ul>
                           <!--<span>1招兵币=1元 10元起充</span>-->
                       </div>
                       <div class="tr_rechnum">



                       </div>

                   </div>
                   <div class="tr_paybox">
                       <input id="dudu" type="submit" value="确认支付" class="tr_pay am-btn" />
                   </div>
                   </form>
        <?php
               }else{
        ?>
               <input type="hidden" name="name" value="<?php echo $auth?>">
               <input type="hidden" name="id" value="<?php echo $uid?>">
               <input type="hidden" name="auth" value="<?php echo $auth1?>">
                   <div class="tr_rechbox">
                       <div class="tr_rechhead">
                           <img style='height: 50px;' src="<?php echo $logo?>"></p>
                           <p>充值帐号：
                               <a><?php echo $auth?></a>
                           </p>

                       </div>
                       <div class="tr_rechli am-form-group">
                           <ul class="ui-choose am-form-group" id="uc_01">
                               <li>
                                   <label class="am-radio-inline">
                                       <input type="radio"  value="1" name="yue" > 一个月
                                   </label>
                               </li>
                               <li>
                                   <label class="am-radio-inline">
                                       <input type="radio" value="3" name="yue" > 三个月
                                   </label>
                               </li>

                               <li>
                                   <label class="am-radio-inline">
                                       <input type="radio" value="6" name="yue"> 半年
                                   </label>
                               </li>
                               <li>
                                   <label class="am-radio-inline">
                                       <input type="radio" value="12" name="yue" data-validation-message="请选择一项充值额度"> 一年
                                   </label>
                               </li>
                           </ul>
                           <!--<span>1招兵币=1元 10元起充</span>-->
                       </div>
                       <div class="tr_rechnum">

                           <?php
                           $time1 = date('Y-m-d');
                           $sql = "select * from user where userName = '$auth'";
                           $result = mysqli_query($link,$sql);
                           while($rows = mysqli_fetch_assoc($result)){
                               $time = $rows['expired'];
                           }
                           if ($auth1 == '会员用户'){
                               echo "  <span id=\"gou\">显示用户过期时间：<p class=\"rechnum\">$time</p></span>";
                           }else{
                               echo "  <span id=\"gou\">显示用户过期时间：<p class=\"rechnum\">$time1</p></span>";
                           }
                           ?>

                       </div>

                   </div>
                   <div class="tr_paybox">
                       <input id="dudu" type="submit" value="确认支付" class="tr_pay am-btn" />
                   </div>
                   <!--</form>-->
                   <script>

                       $("#dudu").click(function () {
                           var data = $("input[name='yue']:checked").val();
                           var a =$("input[name='name']").val();
                           var b =$("input[name='auth']").val();
                           $.ajax({
                               url: "chong.php",
                               type: "POST",
                               data:'aa='+data +'&name='+a +'&auth='+b,
                               //传值
                               dataType: "json",
                               success: function (data) {
                                   $("#gou p").html(data.name);
                               }
                           });
                       });

                   </script>
        <?php
        }
        ?>


<!--<form action="1.php" method="post">-->

    </div>
</div>
        <div id="ft" class="wp cl">
            <div id="flk" class="y">
                <p>

                    <a href="#" title="QQ"><img src="../public/home/images/site_qq.jpg" /></a><span class="pipe">|</span>
                    <a href="#" >小黑屋</a><span class="pipe">|</span><strong><a href="#">思爱婚介</a></strong>
                    ( <a href="#">辽ICP备17005792号</a> | <a  href="#">
                        <img src="../public/home/images/batb.png"/>辽公网安备 21070302000224号</a> )<script>
                        var _hmt = _hmt || [];
                        (function() {
                            var hm = document.createElement("script");
                            hm.src = "https://hm.baidu.com/hm.js?9e8c3f499ab5f67dea0fd34fd9d213e6";
                            var s = document.getElementsByTagName("script")[0];
                            s.parentNode.insertBefore(hm, s);
                        })();
                    </script>
                </p>
                <p class="xs0">
                    GMT+8, 2018-12-12 10:42<span id="debuginfo">
</span>
                </p>
            </div>
            <div id="frt">
                <p>Powered by <strong><a href="#">Discuz!</a></strong> <em>X3.4</em></p>
                <p class="xs0">&copy; 2001-2018 <a href="#">Comsenz Inc.</a></p>
            </div></div>
        <script src="js/home.php" type="text/javascript"></script>

        <div id="scrolltop">
            <span hidefocus="true"><a title="返回顶部" onclick="window.scrollTo('0','0')" class="scrolltopa" ><b>返回顶部</b></a></span>
        </div>
<script type="text/javascript" src="../public/home/js/jquery.min.js"></script>
<script type="text/javascript" src="../public/home/js/amazeui.min.js"></script>
<script type="text/javascript" src="../public/home/js/ui-choose.js"></script>
<script type="text/javascript">
    // 将所有.ui-choose实例化
    $('.ui-choose').ui_choose();
    // uc_01 ul 单选
    var uc_01 = $('#uc_01').data('ui-choose'); // 取回已实例化的对象
    uc_01.click = function(index, item) {
        console.log('click', index, item.text())
    }
    uc_01.change = function(index, item) {
        console.log('change', index, item.text())
    }
    $(function() {
        $('#uc_01 li:eq(3)').click(function() {
            $('.tr_rechoth').show();
            $('.tr_rechoth').find("input").attr('required', 'true')

        })
        $('#uc_01 li:eq(0)').click(function() {
            $('.tr_rechoth').hide();

            $('.othbox').val('');
        })
        $('#uc_01 li:eq(1)').click(function() {
            $('.tr_rechoth').hide();

            $('.othbox').val('');
        })
        $('#uc_01 li:eq(2)').click(function() {
            $('.tr_rechoth').hide();
            $('.othbox').val('');
        })
        $(document).ready(function() {
            $('.othbox').on('input propertychange', function() {
                var num = $(this).val();
                $('.rechnum').html(num + ".00元");
            });
        });
    })


</script>


</body>
</html>